package com.youku.component.connection;

import org.apache.commons.lang3.StringUtils;

public class MysqlConnector extends SqlConnector {

	@Override
	public int defaultPort() {
		return 3306;
	}

	@Override
	protected String url() {
		return "jdbc:mysql://" + ip() + ":" + port() + "/" + map.get("dbname");
	}

	@Override
	protected String driver() {
		String driver = map.get("driver");
		return StringUtils.isBlank(driver) ? "com.mysql.jdbc.Driver" : driver;
	}

}
